﻿@{
    Layout = null;
}
@model System.Collections.IEnumerable
<!DOCTYPE html>
@Html.Partial("LoadPanelPartial")
<html>
<head>
<title></title>
     @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
        new StyleSheet { ExtensionType = ExtensionType.ListBox }
    )
    @Html.DevExpress().GetScripts(
         new Script { ExtensionType = ExtensionType.ListBox }
    )
        @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme },
        new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }
)

    <script type="text/javascript">

        $(function () {
            $("#toolMenu").smartFloat();

            ASPxClientDateEdit.Cast("RKRQBegin").SetValue($("#hidRKRQBegin").val());
            ASPxClientDateEdit.Cast("RKRQEnd").SetValue($("#hidRKRQEnd").val());
            ASPxClientDateEdit.Cast("SSSQBegin").SetValue($("#hidSSSQBegin").val());
            ASPxClientDateEdit.Cast("SSSQEnd").SetValue($("#hidSSSQEnd").val());
            ASPxClientComboBox.Cast("SKSX_DM").SetValue($("#hidSKSX_DM").val());
            ASPxClientComboBox.Cast("ZSFS_DM").SetValue($("#hidZSFS_DM").val());
            ASPxClientComboBox.Cast("FDataSource").SetText($("#hidFDataSource").val());
            ASPxClientTextBox.Cast("NSRBM").SetText($("#hidNSRBM").val());
            ASPxClientTextBox.Cast("NSRMC").SetText($("#hidNSRMC").val());
            ASPxClientComboBox.Cast("HY_DM").SetValue($("#hidHY_DM").val());
            ASPxClientComboBox.Cast("TaxClassNo").SetValue($("#hidTaxClassNo").val());
            ASPxClientComboBox.Cast("YSKM_DM").SetValue($("#hidNSRMC").val());

        });

        function codeOK() {
            codeModalMode.Hide();
            gvEditing.Refresh();
        }

        function codeCancel() {
            codeModalMode.Hide();
        }

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
            e.customArgs["pageIndex"] = s.pageIndex;
            e.customArgs["pageCount"] = s.pageCount;
            e.customArgs["pageRowSize"] = s.pageRowSize;
            e.customArgs["pageRowCount"] = s.pageRowCount;

            e.customArgs["RKRQBegin"] = $('#hidRKRQBegin').val();
            e.customArgs["RKRQEnd"] = $('#hidRKRQEnd').val();
            e.customArgs["SSSQBegin"] = $('#hidSSSQBegin').val();
            e.customArgs["SSSQEnd"] = $('#hidSSSQEnd').val();
            e.customArgs["SKSX_DM"] = $('#hidSKSX_DM').val();
            e.customArgs["ZSFS_DM"] = $('#hidZSFS_DM').val();
            e.customArgs["FDataSource"] = $('#hidFDataSource').val();
            e.customArgs["NSRBM"] = $('#hidNSRBM').val();
            e.customArgs["NSRMC"] = $('#hidNSRMC').val();
            e.customArgs["HY_DM"] = $('#hidHY_DM').val();
            e.customArgs["TaxClassNo"] = $('#hidTaxClassNo').val();
            e.customArgs["YSKM_DM"] = $('#hidYSKM_DM').val();
        }


        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnDSImportDate":
                    {
                        ImportDate();
                        break;
                    }
                case "btnGSImportDate":
                    {
                        window.open(rootPath + '/TaxManager/GSImportDateEdit', "", "", "");
                        break;
                    }
            }
        }

        function ImportDate() {
            lpModal.Show();
            $.ajax({
                type: 'POST',
                url: rootPath + '/TaxManager/DSImportDate',
                success: function (result) {
                    if (result == "e") {
                        alert("系统异常");
                        lpModal.Hide();
                    }
                    else {
                        alert("操作成功");
                        lpModal.Hide();
                        gvEditing.Refresh();
                    }
                }
            });
        }

        //查询
        function search() {
            window.location.href = rootPath + "/TaxManager/Index?RKRQBegin="
                        + RKRQBegin.GetText() + "&RKRQEnd=" + RKRQEnd.GetText() + "&SSSQBegin=" + SSSQBegin.GetValue() + "&SSSQEnd="
                        + SSSQEnd.GetValue() + "&SKSX_DM=" + SKSX_DM.GetValue() + "&ZSFS_DM=" + ZSFS_DM + "&FDataSource="
                        + FDataSource.GetValue() + "&NSRBM=" + NSRBM.GetValue() + "&NSRMC=" + NSRMC + "&HY_DM="
                        + HY_DM.GetValue() + "&TaxClassNo=" + TaxClassNo.GetValue() + "&YSKM_DM=" + YSKM_DM;
        }

       
        //重置
        function undo() {

            ASPxClientDateEdit.Cast("RKRQBegin").SetValue("");
            ASPxClientDateEdit.Cast("RKRQEnd").SetValue("");
            ASPxClientDateEdit.Cast("SSSQBegin").SetValue("");
            ASPxClientDateEdit.Cast("SSSQEnd").SetValue("");
            ASPxClientComboBox.Cast("SKSX_DM").SetValue("");
            ASPxClientComboBox.Cast("ZSFS_DM").SetValue("");
            ASPxClientComboBox.Cast("FDataSource").SetText("");
            ASPxClientTextBox.Cast("NSRBM").SetText("");
            ASPxClientTextBox.Cast("NSRMC").SetText("");
            ASPxClientComboBox.Cast("HY_DM").SetValue("");
            ASPxClientComboBox.Cast("TaxClassNo").SetValue("");
            ASPxClientComboBox.Cast("YSKM_DM").SetValue("");

        }


    </script>

</head>

<body>
    <div>
        @Html.DevExpress().Menu(settings => 
        {
            settings.Name = "toolBarMenu";
            settings.ItemAutoWidth = false;
            settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
            settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
            settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);

            settings.Items.Add(item =>
            {
                item.Name = "btnDSImportDate";
                item.Text = "地税数据导入";
                item.ClientEnabled = true;
                item.Image.Url = Url.Content("~/Content/ControlImages/edit_add.png");

            });
            settings.Items.Add(item =>
            {
                item.Name = "btnGSImportDate";
                item.Text = "国税数据导入";
                item.ItemStyle.ForeColor = System.Drawing.Color.Red;
                item.ClientEnabled = true;
                item.Image.Url = Url.Content("~/Content/ControlImages/cancel.png");

            });


           
            
            settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
            settings.ItemLinkMode = ItemLinkMode.ContentBounds;
        }).GetHtml()
    </div>
    <table width="100%" class="tableForm">
        <tr>
           <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = "纳税人编码:"; }).GetHtml()</td>
           <td class="tdClass">
          @Html.DevExpress().TextBox(settings=>{
         settings.Name = "NSRBM";
         settings.Width = 150;
     }).GetHtml()
              
           </td>
           <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = "纳税人名称:"; }).GetHtml()</td>
           <td class="tdClass">
        @Html.DevExpress().TextBox(settings=>{
         settings.Name = "NSRMC";
         settings.Width = 150;
   }).GetHtml()
           </td>
           <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = "行业门类:"; }).GetHtml()</td>
           <td class="tdClass">
           @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "HY_DM";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
                   settings.Properties.TextField = "HY_MC";
                   settings.Properties.ValueField = "HY_DM";
               }).BindList(ViewData["DMHYList"]).Bind(ViewData["HY_DM"]).GetHtml()
           </td>  
           <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = "征收方式:"; }).GetHtml()</td>
           <td class="tdClass">
            @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "ZSFS_DM";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
                   settings.Properties.TextField = "ZSFS_MC";
                   settings.Properties.ValueField = "ZSFS_DM";
               }).BindList(ViewData["DM_ZSFSList"]).Bind(ViewData["ZSFS_DM"]).GetHtml()
           </td>  
           <td class="tdClass">
           @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnSearch";
                settings.Text = "查询";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
                settings.ClientSideEvents.Click = "search";
            }).GetHtml()

             @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnUndo";
                settings.Text = "重置";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
                settings.ClientSideEvents.Click = "undo";
            }).GetHtml()

           </td>         
        </tr>
        <tr>
            <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = "征收项目:"; }).GetHtml()</td>
           <td class="tdClass">
                   @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "TaxClassNo";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
                   settings.Properties.TextField = "TaxClassName";
                   settings.Properties.ValueField = "TaxClassNo";
               }).BindList(ViewData["TaxClassList"]).Bind(ViewData["ZSXM_DM"]).GetHtml()
           </td>    
            <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = "预算科目:"; }).GetHtml()</td>
           <td class="tdClass">
                   @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "YSKM_DM";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
                   settings.Properties.TextField = "YSKM_MC";
                   settings.Properties.ValueField = "YSKM_DM";
               }).BindList(ViewData["DM_YSKMList"]).Bind(ViewData["YSKM_DM"]).GetHtml()
           </td>            
           <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = "数据来源:"; }).GetHtml()</td>
        <td class="tdClass">
          @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FDataSource";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
                   settings.Properties.TextField = "Text";
                   settings.Properties.ValueField = "Value";
               }).BindList(new List<SelectListItem> { 
                   new SelectListItem { Text = "地税数据", Value = "DS" }, 
                   new SelectListItem { Text = "国税数据", Value = "GS" }, 
                   new SelectListItem { Text = "提退数据", Value = "TT" }
               }).Bind(ViewData["FDataSource"]).GetHtml()
               </td> 
           <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = " 税款属性:"; }).GetHtml()</td>
           <td class="tdClass">
               @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "SKSX_DM";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
                   settings.Properties.TextField = "SKSX_MC";
                   settings.Properties.ValueField = "SKSX_DM";
               }).BindList(ViewData["DM_SKSXList"]).Bind(ViewData["SKSX_DM"]).GetHtml()
           </td>  
           <td class="tdClass">

           </td> 
                
        </tr>
                <tr>
            <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = "入库日期:"; }).GetHtml()</td>
           <td class="tdClass" colspan="3">
          @Html.DevExpress().DateEdit(settings => {
         settings.Name = "RKRQBegin";
         settings.Properties.UseMaskBehavior = true;
     }).GetHtml() - @Html.DevExpress().DateEdit(settings => {
                settings.Name = "RKRQEnd";
                settings.Properties.UseMaskBehavior = true;
            }).GetHtml()
           </td>    
            <td font-size="14pt" class="tdClass" align="right">@Html.DevExpress().Label(settings => { settings.Text = "所属日期:"; }).GetHtml()</td>
           <td class="tdClass" colspan="3">
               @Html.DevExpress().DateEdit(settings => {
              settings.Name = "SSSQBegin";
              settings.Properties.ShowShadow = true;
              settings.Properties.UseMaskBehavior = true;
            }).GetHtml()- @Html.DevExpress().DateEdit(settings => {
                settings.Name = "SSSQEnd";
                settings.Properties.ShowShadow = true;
                settings.Properties.UseMaskBehavior = true;
            }).GetHtml()
           </td>            
         
           <td class="tdClass">

           </td> 
                
        </tr>
    </table>
        @Html.Partial("TaxManagerListPartial", Model)
              @Html.DevExpress().PopupControl(
    settings =>
    {
        settings.Name = "codeModalMode";
        settings.Width = 600;
        settings.Height = 250;
        settings.AllowDragging = true;
        settings.CloseAction = CloseAction.CloseButton;
        settings.EnableAnimation = false;
        settings.HeaderText = "纳税户修改";
        settings.Modal = true;
        settings.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
        settings.PopupVerticalAlign = PopupVerticalAlign.WindowCenter;
        settings.ShowFooter = true;
        settings.SetFooterTemplateContent(s =>
        {
            ViewContext.Writer.Write("<table align='center'><tr><td>");
            @Html.DevExpress().Button(footBtnSettings =>
            {
                footBtnSettings.Name = "btnOK";
                footBtnSettings.Text = "确定";
                footBtnSettings.ClientSideEvents.Click = "function(s,e){popContent.OK()}";
                footBtnSettings.Images.Image.Url = Url.Content("~/Content/ControlImages/ok.png");
                footBtnSettings.CausesValidation = false;
            }).GetHtml();
            ViewContext.Writer.Write("</td><td>");
            @Html.DevExpress().Button(footBtnSettings =>
            {
                footBtnSettings.Name = "btnCancel";
                footBtnSettings.Text = "取消";
                footBtnSettings.ClientSideEvents.Click = "codeCancel";
                footBtnSettings.Images.Image.Url = Url.Content("~/Content/ControlImages/no.png");
                footBtnSettings.CausesValidation = false;
            }).GetHtml();
            ViewContext.Writer.Write("</td></tr></table>");

        });
        settings.SetContent(() =>
       {
           ViewContext.Writer.Write("<iframe  id='popContent' name='popContent' style='width:100%;height:200px' frameborder='0' ></iframe>");
       });
    }).GetHtml()

        @Html.Hidden("hidRKRQBegin", ViewData["RKRQBegin"])
        @Html.Hidden("hidRKRQEnd", ViewData["RKRQEnd"])
        @Html.Hidden("hidSSSQBegin", ViewData["SSSQBegin"])
        @Html.Hidden("hidSSSQEnd", ViewData["SSSQEnd"])
        @Html.Hidden("hidSKSX_DM", ViewData["SKSX_DM"])
        @Html.Hidden("hidZSFS_DM", ViewData["ZSFS_DM"])
        @Html.Hidden("hidFDataSource", ViewData["FDataSource"])

        @Html.Hidden("hidNSRBM", ViewData["NSRBM"])
        @Html.Hidden("hidNSRMC", ViewData["NSRMC"])
        @Html.Hidden("hidHY_DM", ViewData["HY_DM"])
        @Html.Hidden("hidTaxClassNo", ViewData["TaxClassNo"])
        @Html.Hidden("hidYSKM_DM", ViewData["YSKM_DM"])
     <script>
         lp.Hide();
    </script>
</body>
</html>
